/*
 * Singularity Engine
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.singularity.bom;



/**
 * TODO Describe this entity!
 * @author vjache
 */
public abstract class BinaryOperator extends BooleanOperator
{

	private BooleanOperator _leftOperand;
	private BooleanOperator _rightOperand;

	/**
	 * @param aOperatorCode
	 */
	protected BinaryOperator(OpCode aOperatorCode,BooleanOperator aLeftOperand,BooleanOperator aRightOperand)
	{
		super(aOperatorCode);
		_leftOperand = aLeftOperand;
		_rightOperand = aRightOperand;
	}
	
	protected BinaryOperator(OpCode aOperatorCode)
	{
		super(aOperatorCode);
	}

	public BooleanOperator getLeftOperand()
	{
		return _leftOperand;
	}
	public void setLeftOperand(BooleanOperator aOperand)
	{
		_leftOperand = aOperand;
	}
	public BooleanOperator getRightOperand()
	{
		return _rightOperand;
	}
	public void setRightOperand(BooleanOperator aOperand)
	{
		_rightOperand = aOperand;
	}
	
	@Override
	public String toString()
	{
		return String.format("%s(%s, %s)",getOperatorCode(),getLeftOperand(),getRightOperand());
	}
}
